var URL={
	server:location.origin+":8080",
	queryAllCar:"/queryAllCar",
	sendCommand:"/sendCommand",
}

var queryAllCarURL = URL.server+URL.queryAllCar;
var sendCommandURL = URL.server+URL.sendCommand;



queryAllCar = function(){
	var config = {
		type:"POST",
		dataType:"json"
	};
	return request(queryAllCarURL,config,null);
}


sendCommand = function(commandString){

	var carNo = commandString.substring(0,commandString.indexOf(":"));
	commandString = commandString.substring(commandString.indexOf(":")+1,commandString.length+1);

	var config = {
		type:"POST",
		dataType:"json"
	};

	return request(sendCommandURL,config,{
		carNo:carNo,
		commandString:commandString
	});
}
